import {host,port} from "../configfile/config.js"
$(function(){
  const baseURL = "http://" + host + ":" + port
  const file_type=["csv","json"]
  const dbname = decodeURI($(location)[0].pathname.split("/")[1])
  const gid = $(location)[0].pathname.split("/").pop()
  var pageCount = 5 // 页面显示的分页个数
  let getdata_list = { "current": 1, "dbname": dbname, "kwd": "{'type':{'$not':{'$regex':'original'}},'gid':'"+gid+"'}" }
  var r
  var list
  var size = 20; //每页显示九条数据
  var page //总共可以分的页数
  var pageCount = 5 // 页面显示的分页个数
  var Current

  function getDataList(data) {
    let url_current = baseURL + "/getWeiboDetail"
    let response = {}
    $.ajax({
        type: "GET",
        async: false,
        ContentType: "application/json",
        data: data,
        url: url_current,
        success: function(res) {
            response.list = res.data
            response.current = res.current
            response.page = res.page
            console.log(res.data);
        }
    })
    return response
  }

  getDataList(getdata_list)
})